//图片加载失败设置默认图片
angular.module('ZJPC').directive('errSrc', function(){
  return {
    link: function(scope, element, attrs) {
    	// console.log(scope, element, attrs)
      element.bind('error', function() {
        if (attrs.src != attrs.errSrc) {
          attrs.$set('src', attrs.errSrc);
        }
      });
    }
  }
});